package com.test.ds.recursion;

public class TowersApp {

	public static void main(String[] args) {
		int nDisks = 3;
		
		doTwers(nDisks, 'A', 'B', 'C');

	}

	private static void doTwers(int topN, char from, char inter, char to) {
		if(topN == 1){
			System.out.println("Disk 1 from " + from + " to " + to);
		}else{
			doTwers(topN-1, from, to, inter);
			
			System.out.println("Disk " + topN + " from " + from + " to " + to);
			
			doTwers(topN-1, inter, from, to);
		}
		
	}

}
